package com.zfl.thread.day01;

import java.util.Random;

public class StudentDemo {
    public static void main(String[] args) {
        for (int i = 0; i < 30; i++) {
            new Thread(()->{
                int n=new Random().nextInt(100);
                if(n %2==0) {
                    System.out.println(Thread.currentThread().getName()+"正在写代码");
                } else {
                    System.out.println(Thread.currentThread().getName()+"正在看视频");
                }
            }).start();
        }
    }
}
